package com.jnevision.overtime.model;

import java.io.Serializable;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.jnevision.util.DateUtil;

/**
 * <p>
 * 加班申请
 * </p>
 *
 * @author gavin
 * @since 2019-07-14
 */
@TableName("b_overtime")
public class Overtime extends Model<Overtime> {
    private static final long serialVersionUID = -1661705790537355316L;

    @TableId(value = "id", type = IdType.AUTO)
    private String id;

    @TableField("user_id")
    private String userId;

    @TableField("dept_id")
    private Integer deptId;

    @TableField("start")
    private String start;

    @TableField("end")
    private String end;

    @TableField("duration")
    private String duration;

    @TableField("reason")
    private String reason;

    @TableField("create_time")
    private String createTime = DateUtil.getNormalTime();

    @TableField("type")
    private Integer type;
    @TableField(exist = false)
    private Integer result;

    public Integer getType() {
        return this.type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getCreateTime() {
        return this.createTime;
    }

    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public Integer getDeptId() {
        return deptId;
    }

    public void setDeptId(Integer deptId) {
        this.deptId = deptId;
    }

    public String getStart() {
        return start;
    }

    public void setStart(String start) {
        this.start = start;
    }

    public String getEnd() {
        return end;
    }

    public void setEnd(String end) {
        this.end = end;
    }

    public String getDuration() {
        return duration;
    }

    public void setDuration(String duration) {
        this.duration = duration;
    }

    public String getReason() {
        return reason;
    }

    public void setReason(String reason) {
        this.reason = reason;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "Overtime{" + "id=" + id + ", userId=" + userId + ", deptId=" + deptId + ", start=" + start + ", end="
            + end + ", duration=" + duration + ", reason=" + reason + "}";
    }

    public Integer getResult() {
        return this.result;
    }

    public void setResult(Integer result) {
        this.result = result;
    }
}